package com.tbit.uqbike.client.dao.core;

import com.tbit.uqbike.client.pojo.Coupon;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

/**
 * @Author: chen
 * @Description: 优惠券
 * @Date: 创建于 14:07 2020/1/4
 */
public interface CouponDao {
    /**
     * 通过主键id获取
     */
    public Coupon getByCouponId(@Param(value = "couponId") Integer couponId);

    Coupon getByName(Map<String, Object> map);

    void userCouponEdit(@Param("couponId") Integer couponId, @Param("userId") Integer userId, @Param("orderNO") String orderNO);

    /**
     * 获取用户优惠券信息
     * @param couponUserId
     * @return 优惠券信息
     */
    Coupon getByCouponUserId(@Param("couponUserId") Integer couponUserId);
}
